<template>
  <ElSwitch v-model="value" />
</template>
<script setup lang="ts">
  import { ElSwitch } from 'element-plus';
  import { computed, ref, watch, watchEffect } from 'vue';  
  import { Column } from '@/seed-application/types';

  const props = defineProps<{column: Column, modelValue?: boolean}>()

  const emits = defineEmits(['update:modelValue'])

  const value = ref<boolean>(props.modelValue)
  const label = computed(() => value.value ? '真' : '假')

  watchEffect(() => emits('update:modelValue', value.value))
  watch(() => props.modelValue, (val) => value.value = val)
</script>